package com.yilin.tms.message.service;


import com.yilin.tms.core.entity.message.MessageData;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketMessage;
import org.springframework.web.socket.WebSocketSession;

import java.util.List;

public interface ISocketService {

    void sendMessageToUser(MessageData messageData);

    void sendMessageListToUser(List<MessageData> messageDataList);

    void sendMessageToUser(WebSocketSession session, TextMessage message);

    void sendMessageToAllUser(WebSocketMessage<?> message);

    boolean checkOpenUser(String userId);

    WebSocketSession getOpenUser(String userId);
}
